// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file enumerationsTypeObjectSupport.cxx
 * Source file containing the implementation to register the TypeObject representation of the described types in the IDL file
 *
 * This file was generated by the tool fastddsgen.
 */

#include "enumerationsTypeObjectSupport.hpp"

#include <mutex>
#include <string>

#include <fastcdr/xcdr/external.hpp>
#include <fastcdr/xcdr/optional.hpp>
#include <fastdds/dds/domain/DomainParticipantFactory.hpp>
#include <fastdds/dds/log/Log.hpp>
#include <fastdds/dds/xtypes/common.hpp>
#include <fastdds/dds/xtypes/type_representation/ITypeObjectRegistry.hpp>
#include <fastdds/dds/xtypes/type_representation/TypeObject.hpp>
#include <fastdds/dds/xtypes/type_representation/TypeObjectUtils.hpp>

#include "enumerations.hpp"

#include "helpers/basic_inner_types.hpp"

using namespace eprosima::fastdds::dds::xtypes;

void register_enumerations_type_objects()
{
    static std::once_flag once_flag;
    std::call_once(once_flag, []()
            {
                TypeIdentifier type_id;
                register_InnerStructureHelper_type_identifier(type_id);

                register_InnerEmptyStructureHelper_type_identifier(type_id);

                register_InnerUnionHelper_type_identifier(type_id);

                register_EnumStructure_type_identifier(type_id);

                register_BitMaskStructure_type_identifier(type_id);

                register_BoundedBitMaskStructure_type_identifier(type_id);

            });
}

namespace Test {
} // namespace Test
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_EnumStructure_type_identifier(
        TypeIdentifier& type_id)
{
    {
        StructTypeFlag struct_flags_EnumStructure = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::NOT_APPLIED,
                false, false);
        ReturnCode_t return_code_EnumStructure;
        TypeIdentifierPair type_ids_EnumStructure;
        QualifiedTypeName type_name_EnumStructure = "EnumStructure";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_EnumStructure;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_EnumStructure;
        CompleteTypeDetail detail_EnumStructure = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_EnumStructure, ann_custom_EnumStructure, type_name_EnumStructure.to_string());
        CompleteStructHeader header_EnumStructure;
        header_EnumStructure = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_EnumStructure);
        CompleteStructMemberSeq member_seq_EnumStructure;
        {
            return_code_EnumStructure =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "InnerEnumHelper", type_ids_EnumStructure);

            if (return_code_EnumStructure != eprosima::fastdds::dds::RETCODE_OK)
            {
                EnumTypeFlag enum_flags_InnerEnumHelper = 0;
                BitBound bit_bound_InnerEnumHelper = 32;
                CommonEnumeratedHeader common_InnerEnumHelper = TypeObjectUtils::build_common_enumerated_header(bit_bound_InnerEnumHelper);
                QualifiedTypeName type_name_InnerEnumHelper = "InnerEnumHelper";
                eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_InnerEnumHelper;
                eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_InnerEnumHelper;
                CompleteTypeDetail detail_InnerEnumHelper = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_InnerEnumHelper, ann_custom_InnerEnumHelper, type_name_InnerEnumHelper.to_string());
                CompleteEnumeratedHeader header_InnerEnumHelper = TypeObjectUtils::build_complete_enumerated_header(common_InnerEnumHelper, detail_InnerEnumHelper);
                CompleteEnumeratedLiteralSeq literal_seq_InnerEnumHelper;
                {
                    EnumeratedLiteralFlag flags_ENUM_VALUE_1 = TypeObjectUtils::build_enumerated_literal_flag(false);
                    CommonEnumeratedLiteral common_ENUM_VALUE_1 = TypeObjectUtils::build_common_enumerated_literal(0, flags_ENUM_VALUE_1);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_ENUM_VALUE_1;
                    ann_custom_InnerEnumHelper.reset();
                    MemberName name_ENUM_VALUE_1 = "ENUM_VALUE_1";
                    CompleteMemberDetail detail_ENUM_VALUE_1 = TypeObjectUtils::build_complete_member_detail(name_ENUM_VALUE_1, member_ann_builtin_ENUM_VALUE_1, ann_custom_InnerEnumHelper);
                    CompleteEnumeratedLiteral literal_ENUM_VALUE_1 = TypeObjectUtils::build_complete_enumerated_literal(common_ENUM_VALUE_1, detail_ENUM_VALUE_1);
                    TypeObjectUtils::add_complete_enumerated_literal(literal_seq_InnerEnumHelper, literal_ENUM_VALUE_1);
                }
                {
                    EnumeratedLiteralFlag flags_ENUM_VALUE_2 = TypeObjectUtils::build_enumerated_literal_flag(false);
                    CommonEnumeratedLiteral common_ENUM_VALUE_2 = TypeObjectUtils::build_common_enumerated_literal(1, flags_ENUM_VALUE_2);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_ENUM_VALUE_2;
                    ann_custom_InnerEnumHelper.reset();
                    MemberName name_ENUM_VALUE_2 = "ENUM_VALUE_2";
                    CompleteMemberDetail detail_ENUM_VALUE_2 = TypeObjectUtils::build_complete_member_detail(name_ENUM_VALUE_2, member_ann_builtin_ENUM_VALUE_2, ann_custom_InnerEnumHelper);
                    CompleteEnumeratedLiteral literal_ENUM_VALUE_2 = TypeObjectUtils::build_complete_enumerated_literal(common_ENUM_VALUE_2, detail_ENUM_VALUE_2);
                    TypeObjectUtils::add_complete_enumerated_literal(literal_seq_InnerEnumHelper, literal_ENUM_VALUE_2);
                }
                {
                    EnumeratedLiteralFlag flags_ENUM_VALUE_3 = TypeObjectUtils::build_enumerated_literal_flag(false);
                    CommonEnumeratedLiteral common_ENUM_VALUE_3 = TypeObjectUtils::build_common_enumerated_literal(2, flags_ENUM_VALUE_3);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_ENUM_VALUE_3;
                    ann_custom_InnerEnumHelper.reset();
                    MemberName name_ENUM_VALUE_3 = "ENUM_VALUE_3";
                    CompleteMemberDetail detail_ENUM_VALUE_3 = TypeObjectUtils::build_complete_member_detail(name_ENUM_VALUE_3, member_ann_builtin_ENUM_VALUE_3, ann_custom_InnerEnumHelper);
                    CompleteEnumeratedLiteral literal_ENUM_VALUE_3 = TypeObjectUtils::build_complete_enumerated_literal(common_ENUM_VALUE_3, detail_ENUM_VALUE_3);
                    TypeObjectUtils::add_complete_enumerated_literal(literal_seq_InnerEnumHelper, literal_ENUM_VALUE_3);
                }
                CompleteEnumeratedType enumerated_type_InnerEnumHelper = TypeObjectUtils::build_complete_enumerated_type(enum_flags_InnerEnumHelper, header_InnerEnumHelper,
                        literal_seq_InnerEnumHelper);
                if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                        TypeObjectUtils::build_and_register_enumerated_type_object(enumerated_type_InnerEnumHelper, type_name_InnerEnumHelper.to_string()))
                {
                    EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "InnerEnumHelper already registered in TypeObjectRegistry for a different type.");
                }
                return_code_EnumStructure =
                    eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                    "InnerEnumHelper", type_ids_EnumStructure);
                if (return_code_EnumStructure != eprosima::fastdds::dds::RETCODE_OK)
                {
                    EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                                "InnerEnumHelper: Given Enum TypeIdentifier unknown to TypeObjectRegistry.");
                    type_id = TypeIdentifier();
                    return;
                }
            }
            StructMemberFlag member_flags_var_InnerEnumHelper = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED,
                    false, false, false, false);
            CommonStructMember common_var_InnerEnumHelper;
            MemberId member_id_var_InnerEnumHelper = 0x00000000;
            if (EK_COMPLETE == type_ids_EnumStructure.type_identifier1()._d() || TK_NONE == type_ids_EnumStructure.type_identifier2()._d() ||
                    (TI_PLAIN_SEQUENCE_SMALL == type_ids_EnumStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier1().seq_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_SEQUENCE_LARGE == type_ids_EnumStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier1().seq_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_SMALL == type_ids_EnumStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier1().array_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_LARGE == type_ids_EnumStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier1().array_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_MAP_SMALL == type_ids_EnumStructure.type_identifier1()._d() &&
                    (EK_COMPLETE == type_ids_EnumStructure.type_identifier1().map_sdefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier1().map_sdefn().key_identifier()->_d())) ||
                    (TI_PLAIN_MAP_LARGE == type_ids_EnumStructure.type_identifier1()._d() &&
                    (EK_COMPLETE == type_ids_EnumStructure.type_identifier1().map_ldefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier1().map_ldefn().key_identifier()->_d())))
            {
                common_var_InnerEnumHelper = TypeObjectUtils::build_common_struct_member(member_id_var_InnerEnumHelper, member_flags_var_InnerEnumHelper, type_ids_EnumStructure.type_identifier1());
            }
            else if (EK_COMPLETE == type_ids_EnumStructure.type_identifier2()._d() ||
                    (TI_PLAIN_SEQUENCE_SMALL == type_ids_EnumStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier2().seq_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_SEQUENCE_LARGE == type_ids_EnumStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier2().seq_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_SMALL == type_ids_EnumStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier2().array_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_LARGE == type_ids_EnumStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier2().array_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_MAP_SMALL == type_ids_EnumStructure.type_identifier2()._d() &&
                    (EK_COMPLETE == type_ids_EnumStructure.type_identifier2().map_sdefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier2().map_sdefn().key_identifier()->_d())) ||
                    (TI_PLAIN_MAP_LARGE == type_ids_EnumStructure.type_identifier2()._d() &&
                    (EK_COMPLETE == type_ids_EnumStructure.type_identifier2().map_ldefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier2().map_ldefn().key_identifier()->_d())))
            {
                common_var_InnerEnumHelper = TypeObjectUtils::build_common_struct_member(member_id_var_InnerEnumHelper, member_flags_var_InnerEnumHelper, type_ids_EnumStructure.type_identifier2());
            }
            else
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "Structure var_InnerEnumHelper member TypeIdentifier inconsistent.");
                type_id = TypeIdentifier();
                return;
            }
            MemberName name_var_InnerEnumHelper = "var_InnerEnumHelper";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_var_InnerEnumHelper;
            ann_custom_EnumStructure.reset();
            CompleteMemberDetail detail_var_InnerEnumHelper = TypeObjectUtils::build_complete_member_detail(name_var_InnerEnumHelper, member_ann_builtin_var_InnerEnumHelper, ann_custom_EnumStructure);
            CompleteStructMember member_var_InnerEnumHelper = TypeObjectUtils::build_complete_struct_member(common_var_InnerEnumHelper, detail_var_InnerEnumHelper);
            TypeObjectUtils::add_complete_struct_member(member_seq_EnumStructure, member_var_InnerEnumHelper);
        }
        {
            return_code_EnumStructure =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "Test::InnerEnumHelper", type_ids_EnumStructure);

            if (return_code_EnumStructure != eprosima::fastdds::dds::RETCODE_OK)
            {
                EnumTypeFlag enum_flags_InnerEnumHelper = 0;
                BitBound bit_bound_InnerEnumHelper = 32;
                CommonEnumeratedHeader common_InnerEnumHelper = TypeObjectUtils::build_common_enumerated_header(bit_bound_InnerEnumHelper);
                QualifiedTypeName type_name_InnerEnumHelper = "Test::InnerEnumHelper";
                eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_InnerEnumHelper;
                eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_InnerEnumHelper;
                CompleteTypeDetail detail_InnerEnumHelper = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_InnerEnumHelper, ann_custom_InnerEnumHelper, type_name_InnerEnumHelper.to_string());
                CompleteEnumeratedHeader header_InnerEnumHelper = TypeObjectUtils::build_complete_enumerated_header(common_InnerEnumHelper, detail_InnerEnumHelper);
                CompleteEnumeratedLiteralSeq literal_seq_InnerEnumHelper;
                {
                    EnumeratedLiteralFlag flags_ENUM_VALUE_1 = TypeObjectUtils::build_enumerated_literal_flag(false);
                    CommonEnumeratedLiteral common_ENUM_VALUE_1 = TypeObjectUtils::build_common_enumerated_literal(0, flags_ENUM_VALUE_1);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_ENUM_VALUE_1;
                    ann_custom_InnerEnumHelper.reset();
                    MemberName name_ENUM_VALUE_1 = "ENUM_VALUE_1";
                    CompleteMemberDetail detail_ENUM_VALUE_1 = TypeObjectUtils::build_complete_member_detail(name_ENUM_VALUE_1, member_ann_builtin_ENUM_VALUE_1, ann_custom_InnerEnumHelper);
                    CompleteEnumeratedLiteral literal_ENUM_VALUE_1 = TypeObjectUtils::build_complete_enumerated_literal(common_ENUM_VALUE_1, detail_ENUM_VALUE_1);
                    TypeObjectUtils::add_complete_enumerated_literal(literal_seq_InnerEnumHelper, literal_ENUM_VALUE_1);
                }
                {
                    EnumeratedLiteralFlag flags_ENUM_VALUE_2 = TypeObjectUtils::build_enumerated_literal_flag(false);
                    CommonEnumeratedLiteral common_ENUM_VALUE_2 = TypeObjectUtils::build_common_enumerated_literal(1, flags_ENUM_VALUE_2);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_ENUM_VALUE_2;
                    ann_custom_InnerEnumHelper.reset();
                    MemberName name_ENUM_VALUE_2 = "ENUM_VALUE_2";
                    CompleteMemberDetail detail_ENUM_VALUE_2 = TypeObjectUtils::build_complete_member_detail(name_ENUM_VALUE_2, member_ann_builtin_ENUM_VALUE_2, ann_custom_InnerEnumHelper);
                    CompleteEnumeratedLiteral literal_ENUM_VALUE_2 = TypeObjectUtils::build_complete_enumerated_literal(common_ENUM_VALUE_2, detail_ENUM_VALUE_2);
                    TypeObjectUtils::add_complete_enumerated_literal(literal_seq_InnerEnumHelper, literal_ENUM_VALUE_2);
                }
                {
                    EnumeratedLiteralFlag flags_ENUM_VALUE_3 = TypeObjectUtils::build_enumerated_literal_flag(false);
                    CommonEnumeratedLiteral common_ENUM_VALUE_3 = TypeObjectUtils::build_common_enumerated_literal(2, flags_ENUM_VALUE_3);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_ENUM_VALUE_3;
                    ann_custom_InnerEnumHelper.reset();
                    MemberName name_ENUM_VALUE_3 = "ENUM_VALUE_3";
                    CompleteMemberDetail detail_ENUM_VALUE_3 = TypeObjectUtils::build_complete_member_detail(name_ENUM_VALUE_3, member_ann_builtin_ENUM_VALUE_3, ann_custom_InnerEnumHelper);
                    CompleteEnumeratedLiteral literal_ENUM_VALUE_3 = TypeObjectUtils::build_complete_enumerated_literal(common_ENUM_VALUE_3, detail_ENUM_VALUE_3);
                    TypeObjectUtils::add_complete_enumerated_literal(literal_seq_InnerEnumHelper, literal_ENUM_VALUE_3);
                }
                CompleteEnumeratedType enumerated_type_InnerEnumHelper = TypeObjectUtils::build_complete_enumerated_type(enum_flags_InnerEnumHelper, header_InnerEnumHelper,
                        literal_seq_InnerEnumHelper);
                if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                        TypeObjectUtils::build_and_register_enumerated_type_object(enumerated_type_InnerEnumHelper, type_name_InnerEnumHelper.to_string()))
                {
                    EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "Test::InnerEnumHelper already registered in TypeObjectRegistry for a different type.");
                }
                return_code_EnumStructure =
                    eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                    "Test::InnerEnumHelper", type_ids_EnumStructure);
                if (return_code_EnumStructure != eprosima::fastdds::dds::RETCODE_OK)
                {
                    EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                                "Test::InnerEnumHelper: Given Enum TypeIdentifier unknown to TypeObjectRegistry.");
                    type_id = TypeIdentifier();
                    return;
                }
            }
            StructMemberFlag member_flags_var_scoped_InnerEnumHelper = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED,
                    false, false, false, false);
            CommonStructMember common_var_scoped_InnerEnumHelper;
            MemberId member_id_var_scoped_InnerEnumHelper = 0x00000001;
            if (EK_COMPLETE == type_ids_EnumStructure.type_identifier1()._d() || TK_NONE == type_ids_EnumStructure.type_identifier2()._d() ||
                    (TI_PLAIN_SEQUENCE_SMALL == type_ids_EnumStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier1().seq_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_SEQUENCE_LARGE == type_ids_EnumStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier1().seq_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_SMALL == type_ids_EnumStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier1().array_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_LARGE == type_ids_EnumStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier1().array_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_MAP_SMALL == type_ids_EnumStructure.type_identifier1()._d() &&
                    (EK_COMPLETE == type_ids_EnumStructure.type_identifier1().map_sdefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier1().map_sdefn().key_identifier()->_d())) ||
                    (TI_PLAIN_MAP_LARGE == type_ids_EnumStructure.type_identifier1()._d() &&
                    (EK_COMPLETE == type_ids_EnumStructure.type_identifier1().map_ldefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier1().map_ldefn().key_identifier()->_d())))
            {
                common_var_scoped_InnerEnumHelper = TypeObjectUtils::build_common_struct_member(member_id_var_scoped_InnerEnumHelper, member_flags_var_scoped_InnerEnumHelper, type_ids_EnumStructure.type_identifier1());
            }
            else if (EK_COMPLETE == type_ids_EnumStructure.type_identifier2()._d() ||
                    (TI_PLAIN_SEQUENCE_SMALL == type_ids_EnumStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier2().seq_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_SEQUENCE_LARGE == type_ids_EnumStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier2().seq_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_SMALL == type_ids_EnumStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier2().array_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_LARGE == type_ids_EnumStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier2().array_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_MAP_SMALL == type_ids_EnumStructure.type_identifier2()._d() &&
                    (EK_COMPLETE == type_ids_EnumStructure.type_identifier2().map_sdefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier2().map_sdefn().key_identifier()->_d())) ||
                    (TI_PLAIN_MAP_LARGE == type_ids_EnumStructure.type_identifier2()._d() &&
                    (EK_COMPLETE == type_ids_EnumStructure.type_identifier2().map_ldefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_EnumStructure.type_identifier2().map_ldefn().key_identifier()->_d())))
            {
                common_var_scoped_InnerEnumHelper = TypeObjectUtils::build_common_struct_member(member_id_var_scoped_InnerEnumHelper, member_flags_var_scoped_InnerEnumHelper, type_ids_EnumStructure.type_identifier2());
            }
            else
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "Structure var_scoped_InnerEnumHelper member TypeIdentifier inconsistent.");
                type_id = TypeIdentifier();
                return;
            }
            MemberName name_var_scoped_InnerEnumHelper = "var_scoped_InnerEnumHelper";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_var_scoped_InnerEnumHelper;
            ann_custom_EnumStructure.reset();
            CompleteMemberDetail detail_var_scoped_InnerEnumHelper = TypeObjectUtils::build_complete_member_detail(name_var_scoped_InnerEnumHelper, member_ann_builtin_var_scoped_InnerEnumHelper, ann_custom_EnumStructure);
            CompleteStructMember member_var_scoped_InnerEnumHelper = TypeObjectUtils::build_complete_struct_member(common_var_scoped_InnerEnumHelper, detail_var_scoped_InnerEnumHelper);
            TypeObjectUtils::add_complete_struct_member(member_seq_EnumStructure, member_var_scoped_InnerEnumHelper);
        }
        CompleteStructType struct_type_EnumStructure = TypeObjectUtils::build_complete_struct_type(struct_flags_EnumStructure, header_EnumStructure, member_seq_EnumStructure);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_EnumStructure, type_name_EnumStructure.to_string(), type_id))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "EnumStructure already registered in TypeObjectRegistry for a different type.");
        }
        return_code_EnumStructure =
            eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
            "EnumStructure", type_ids_EnumStructure);
        if (return_code_EnumStructure != eprosima::fastdds::dds::RETCODE_OK)
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "EnumStructure: Given Struct TypeIdentifier unknown to TypeObjectRegistry.");
            type_id = TypeIdentifier();
            return;
        }
    }
}
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_BitMaskStructure_type_identifier(
        TypeIdentifier& type_id)
{
    {
        StructTypeFlag struct_flags_BitMaskStructure = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::NOT_APPLIED,
                false, false);
        ReturnCode_t return_code_BitMaskStructure;
        TypeIdentifierPair type_ids_BitMaskStructure;
        QualifiedTypeName type_name_BitMaskStructure = "BitMaskStructure";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_BitMaskStructure;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_BitMaskStructure;
        CompleteTypeDetail detail_BitMaskStructure = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_BitMaskStructure, ann_custom_BitMaskStructure, type_name_BitMaskStructure.to_string());
        CompleteStructHeader header_BitMaskStructure;
        header_BitMaskStructure = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_BitMaskStructure);
        CompleteStructMemberSeq member_seq_BitMaskStructure;
        {
            return_code_BitMaskStructure =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "InnerBitMaskHelper", type_ids_BitMaskStructure);

            if (return_code_BitMaskStructure != eprosima::fastdds::dds::RETCODE_OK)
            {
                BitmaskTypeFlag bitmask_flags_InnerBitMaskHelper = 0;
                BitBound bit_bound_InnerBitMaskHelper = 32;
                CommonEnumeratedHeader common_InnerBitMaskHelper = TypeObjectUtils::build_common_enumerated_header(bit_bound_InnerBitMaskHelper, true);
                QualifiedTypeName type_name_InnerBitMaskHelper = "InnerBitMaskHelper";
                eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_InnerBitMaskHelper;
                eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_InnerBitMaskHelper;
                CompleteTypeDetail detail_InnerBitMaskHelper = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_InnerBitMaskHelper, ann_custom_InnerBitMaskHelper, type_name_InnerBitMaskHelper.to_string());
                CompleteEnumeratedHeader header_InnerBitMaskHelper = TypeObjectUtils::build_complete_enumerated_header(common_InnerBitMaskHelper, detail_InnerBitMaskHelper, true);
                CompleteBitflagSeq flag_seq_InnerBitMaskHelper;
                {
                    uint16_t position_flag0 = 0;
                    BitflagFlag flags_flag0 = 0;
                    CommonBitflag common_flag0 = TypeObjectUtils::build_common_bitflag(position_flag0, flags_flag0);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_flag0;
                    ann_custom_InnerBitMaskHelper.reset();
                    AppliedAnnotationSeq tmp_ann_custom_flag0;
                    if (!tmp_ann_custom_flag0.empty())
                    {
                        ann_custom_InnerBitMaskHelper = tmp_ann_custom_flag0;
                    }
                    MemberName name_flag0 = "flag0";
                    CompleteMemberDetail detail_flag0 = TypeObjectUtils::build_complete_member_detail(name_flag0, member_ann_builtin_flag0, ann_custom_InnerBitMaskHelper);
                    CompleteBitflag bitflag_flag0 = TypeObjectUtils::build_complete_bitflag(common_flag0, detail_flag0);
                    TypeObjectUtils::add_complete_bitflag(flag_seq_InnerBitMaskHelper, bitflag_flag0);
                }
                {
                    uint16_t position_flag1 = 1;
                    BitflagFlag flags_flag1 = 0;
                    CommonBitflag common_flag1 = TypeObjectUtils::build_common_bitflag(position_flag1, flags_flag1);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_flag1;
                    ann_custom_InnerBitMaskHelper.reset();
                    AppliedAnnotationSeq tmp_ann_custom_flag1;
                    if (!tmp_ann_custom_flag1.empty())
                    {
                        ann_custom_InnerBitMaskHelper = tmp_ann_custom_flag1;
                    }
                    MemberName name_flag1 = "flag1";
                    CompleteMemberDetail detail_flag1 = TypeObjectUtils::build_complete_member_detail(name_flag1, member_ann_builtin_flag1, ann_custom_InnerBitMaskHelper);
                    CompleteBitflag bitflag_flag1 = TypeObjectUtils::build_complete_bitflag(common_flag1, detail_flag1);
                    TypeObjectUtils::add_complete_bitflag(flag_seq_InnerBitMaskHelper, bitflag_flag1);
                }
                {
                    uint16_t position_flag4 = 4;
                    BitflagFlag flags_flag4 = 0;
                    CommonBitflag common_flag4 = TypeObjectUtils::build_common_bitflag(position_flag4, flags_flag4);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_flag4;
                    ann_custom_InnerBitMaskHelper.reset();
                    AppliedAnnotationSeq tmp_ann_custom_flag4;
                    if (!tmp_ann_custom_flag4.empty())
                    {
                        ann_custom_InnerBitMaskHelper = tmp_ann_custom_flag4;
                    }
                    MemberName name_flag4 = "flag4";
                    CompleteMemberDetail detail_flag4 = TypeObjectUtils::build_complete_member_detail(name_flag4, member_ann_builtin_flag4, ann_custom_InnerBitMaskHelper);
                    CompleteBitflag bitflag_flag4 = TypeObjectUtils::build_complete_bitflag(common_flag4, detail_flag4);
                    TypeObjectUtils::add_complete_bitflag(flag_seq_InnerBitMaskHelper, bitflag_flag4);
                }
                {
                    uint16_t position_flag6 = 6;
                    BitflagFlag flags_flag6 = 0;
                    CommonBitflag common_flag6 = TypeObjectUtils::build_common_bitflag(position_flag6, flags_flag6);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_flag6;
                    ann_custom_InnerBitMaskHelper.reset();
                    AppliedAnnotationSeq tmp_ann_custom_flag6;
                    if (!tmp_ann_custom_flag6.empty())
                    {
                        ann_custom_InnerBitMaskHelper = tmp_ann_custom_flag6;
                    }
                    MemberName name_flag6 = "flag6";
                    CompleteMemberDetail detail_flag6 = TypeObjectUtils::build_complete_member_detail(name_flag6, member_ann_builtin_flag6, ann_custom_InnerBitMaskHelper);
                    CompleteBitflag bitflag_flag6 = TypeObjectUtils::build_complete_bitflag(common_flag6, detail_flag6);
                    TypeObjectUtils::add_complete_bitflag(flag_seq_InnerBitMaskHelper, bitflag_flag6);
                }
                CompleteBitmaskType bitmask_type_InnerBitMaskHelper = TypeObjectUtils::build_complete_bitmask_type(bitmask_flags_InnerBitMaskHelper, header_InnerBitMaskHelper, flag_seq_InnerBitMaskHelper);
                if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                        TypeObjectUtils::build_and_register_bitmask_type_object(bitmask_type_InnerBitMaskHelper, type_name_InnerBitMaskHelper.to_string()))
                {
                    EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "InnerBitMaskHelper already registered in TypeObjectRegistry for a different type.");
                }
                return_code_BitMaskStructure =
                    eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                    "InnerBitMaskHelper", type_ids_BitMaskStructure);
                if (return_code_BitMaskStructure != eprosima::fastdds::dds::RETCODE_OK)
                {
                    EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                                "InnerBitMaskHelper: Given Enum TypeIdentifier unknown to TypeObjectRegistry.");
                    type_id = TypeIdentifier();
                    return;
                }
            }
            StructMemberFlag member_flags_var_InnerBitMaskHelper = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED,
                    false, false, false, false);
            CommonStructMember common_var_InnerBitMaskHelper;
            MemberId member_id_var_InnerBitMaskHelper = 0x00000000;
            if (EK_COMPLETE == type_ids_BitMaskStructure.type_identifier1()._d() || TK_NONE == type_ids_BitMaskStructure.type_identifier2()._d() ||
                    (TI_PLAIN_SEQUENCE_SMALL == type_ids_BitMaskStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_BitMaskStructure.type_identifier1().seq_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_SEQUENCE_LARGE == type_ids_BitMaskStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_BitMaskStructure.type_identifier1().seq_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_SMALL == type_ids_BitMaskStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_BitMaskStructure.type_identifier1().array_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_LARGE == type_ids_BitMaskStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_BitMaskStructure.type_identifier1().array_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_MAP_SMALL == type_ids_BitMaskStructure.type_identifier1()._d() &&
                    (EK_COMPLETE == type_ids_BitMaskStructure.type_identifier1().map_sdefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_BitMaskStructure.type_identifier1().map_sdefn().key_identifier()->_d())) ||
                    (TI_PLAIN_MAP_LARGE == type_ids_BitMaskStructure.type_identifier1()._d() &&
                    (EK_COMPLETE == type_ids_BitMaskStructure.type_identifier1().map_ldefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_BitMaskStructure.type_identifier1().map_ldefn().key_identifier()->_d())))
            {
                common_var_InnerBitMaskHelper = TypeObjectUtils::build_common_struct_member(member_id_var_InnerBitMaskHelper, member_flags_var_InnerBitMaskHelper, type_ids_BitMaskStructure.type_identifier1());
            }
            else if (EK_COMPLETE == type_ids_BitMaskStructure.type_identifier2()._d() ||
                    (TI_PLAIN_SEQUENCE_SMALL == type_ids_BitMaskStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_BitMaskStructure.type_identifier2().seq_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_SEQUENCE_LARGE == type_ids_BitMaskStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_BitMaskStructure.type_identifier2().seq_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_SMALL == type_ids_BitMaskStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_BitMaskStructure.type_identifier2().array_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_LARGE == type_ids_BitMaskStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_BitMaskStructure.type_identifier2().array_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_MAP_SMALL == type_ids_BitMaskStructure.type_identifier2()._d() &&
                    (EK_COMPLETE == type_ids_BitMaskStructure.type_identifier2().map_sdefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_BitMaskStructure.type_identifier2().map_sdefn().key_identifier()->_d())) ||
                    (TI_PLAIN_MAP_LARGE == type_ids_BitMaskStructure.type_identifier2()._d() &&
                    (EK_COMPLETE == type_ids_BitMaskStructure.type_identifier2().map_ldefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_BitMaskStructure.type_identifier2().map_ldefn().key_identifier()->_d())))
            {
                common_var_InnerBitMaskHelper = TypeObjectUtils::build_common_struct_member(member_id_var_InnerBitMaskHelper, member_flags_var_InnerBitMaskHelper, type_ids_BitMaskStructure.type_identifier2());
            }
            else
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "Structure var_InnerBitMaskHelper member TypeIdentifier inconsistent.");
                type_id = TypeIdentifier();
                return;
            }
            MemberName name_var_InnerBitMaskHelper = "var_InnerBitMaskHelper";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_var_InnerBitMaskHelper;
            ann_custom_BitMaskStructure.reset();
            CompleteMemberDetail detail_var_InnerBitMaskHelper = TypeObjectUtils::build_complete_member_detail(name_var_InnerBitMaskHelper, member_ann_builtin_var_InnerBitMaskHelper, ann_custom_BitMaskStructure);
            CompleteStructMember member_var_InnerBitMaskHelper = TypeObjectUtils::build_complete_struct_member(common_var_InnerBitMaskHelper, detail_var_InnerBitMaskHelper);
            TypeObjectUtils::add_complete_struct_member(member_seq_BitMaskStructure, member_var_InnerBitMaskHelper);
        }
        CompleteStructType struct_type_BitMaskStructure = TypeObjectUtils::build_complete_struct_type(struct_flags_BitMaskStructure, header_BitMaskStructure, member_seq_BitMaskStructure);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_BitMaskStructure, type_name_BitMaskStructure.to_string(), type_id))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "BitMaskStructure already registered in TypeObjectRegistry for a different type.");
        }
        return_code_BitMaskStructure =
            eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
            "BitMaskStructure", type_ids_BitMaskStructure);
        if (return_code_BitMaskStructure != eprosima::fastdds::dds::RETCODE_OK)
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "BitMaskStructure: Given Struct TypeIdentifier unknown to TypeObjectRegistry.");
            type_id = TypeIdentifier();
            return;
        }
    }
}
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_BoundedBitMaskStructure_type_identifier(
        TypeIdentifier& type_id)
{
    {
        StructTypeFlag struct_flags_BoundedBitMaskStructure = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::NOT_APPLIED,
                false, false);
        ReturnCode_t return_code_BoundedBitMaskStructure;
        TypeIdentifierPair type_ids_BoundedBitMaskStructure;
        QualifiedTypeName type_name_BoundedBitMaskStructure = "BoundedBitMaskStructure";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_BoundedBitMaskStructure;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_BoundedBitMaskStructure;
        CompleteTypeDetail detail_BoundedBitMaskStructure = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_BoundedBitMaskStructure, ann_custom_BoundedBitMaskStructure, type_name_BoundedBitMaskStructure.to_string());
        CompleteStructHeader header_BoundedBitMaskStructure;
        header_BoundedBitMaskStructure = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_BoundedBitMaskStructure);
        CompleteStructMemberSeq member_seq_BoundedBitMaskStructure;
        {
            return_code_BoundedBitMaskStructure =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "InnerBoundedBitMaskHelper", type_ids_BoundedBitMaskStructure);

            if (return_code_BoundedBitMaskStructure != eprosima::fastdds::dds::RETCODE_OK)
            {
                BitmaskTypeFlag bitmask_flags_InnerBoundedBitMaskHelper = 0;
                BitBound bit_bound_InnerBoundedBitMaskHelper = 8;
                CommonEnumeratedHeader common_InnerBoundedBitMaskHelper = TypeObjectUtils::build_common_enumerated_header(bit_bound_InnerBoundedBitMaskHelper, true);
                QualifiedTypeName type_name_InnerBoundedBitMaskHelper = "InnerBoundedBitMaskHelper";
                eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_InnerBoundedBitMaskHelper;
                eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_InnerBoundedBitMaskHelper;
                AppliedAnnotationSeq tmp_ann_custom_InnerBoundedBitMaskHelper;
                eprosima::fastcdr::optional<AppliedVerbatimAnnotation> verbatim_InnerBoundedBitMaskHelper;
                if (!tmp_ann_custom_InnerBoundedBitMaskHelper.empty())
                {
                    ann_custom_InnerBoundedBitMaskHelper = tmp_ann_custom_InnerBoundedBitMaskHelper;
                }

                CompleteTypeDetail detail_InnerBoundedBitMaskHelper = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_InnerBoundedBitMaskHelper, ann_custom_InnerBoundedBitMaskHelper, type_name_InnerBoundedBitMaskHelper.to_string());
                CompleteEnumeratedHeader header_InnerBoundedBitMaskHelper = TypeObjectUtils::build_complete_enumerated_header(common_InnerBoundedBitMaskHelper, detail_InnerBoundedBitMaskHelper, true);
                CompleteBitflagSeq flag_seq_InnerBoundedBitMaskHelper;
                {
                    uint16_t position_bflag0 = 0;
                    BitflagFlag flags_bflag0 = 0;
                    CommonBitflag common_bflag0 = TypeObjectUtils::build_common_bitflag(position_bflag0, flags_bflag0);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_bflag0;
                    ann_custom_InnerBoundedBitMaskHelper.reset();
                    AppliedAnnotationSeq tmp_ann_custom_bflag0;
                    if (!tmp_ann_custom_bflag0.empty())
                    {
                        ann_custom_InnerBoundedBitMaskHelper = tmp_ann_custom_bflag0;
                    }
                    MemberName name_bflag0 = "bflag0";
                    CompleteMemberDetail detail_bflag0 = TypeObjectUtils::build_complete_member_detail(name_bflag0, member_ann_builtin_bflag0, ann_custom_InnerBoundedBitMaskHelper);
                    CompleteBitflag bitflag_bflag0 = TypeObjectUtils::build_complete_bitflag(common_bflag0, detail_bflag0);
                    TypeObjectUtils::add_complete_bitflag(flag_seq_InnerBoundedBitMaskHelper, bitflag_bflag0);
                }
                {
                    uint16_t position_bflag1 = 1;
                    BitflagFlag flags_bflag1 = 0;
                    CommonBitflag common_bflag1 = TypeObjectUtils::build_common_bitflag(position_bflag1, flags_bflag1);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_bflag1;
                    ann_custom_InnerBoundedBitMaskHelper.reset();
                    AppliedAnnotationSeq tmp_ann_custom_bflag1;
                    if (!tmp_ann_custom_bflag1.empty())
                    {
                        ann_custom_InnerBoundedBitMaskHelper = tmp_ann_custom_bflag1;
                    }
                    MemberName name_bflag1 = "bflag1";
                    CompleteMemberDetail detail_bflag1 = TypeObjectUtils::build_complete_member_detail(name_bflag1, member_ann_builtin_bflag1, ann_custom_InnerBoundedBitMaskHelper);
                    CompleteBitflag bitflag_bflag1 = TypeObjectUtils::build_complete_bitflag(common_bflag1, detail_bflag1);
                    TypeObjectUtils::add_complete_bitflag(flag_seq_InnerBoundedBitMaskHelper, bitflag_bflag1);
                }
                {
                    uint16_t position_bflag4 = 4;
                    BitflagFlag flags_bflag4 = 0;
                    CommonBitflag common_bflag4 = TypeObjectUtils::build_common_bitflag(position_bflag4, flags_bflag4);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_bflag4;
                    ann_custom_InnerBoundedBitMaskHelper.reset();
                    AppliedAnnotationSeq tmp_ann_custom_bflag4;
                    if (!tmp_ann_custom_bflag4.empty())
                    {
                        ann_custom_InnerBoundedBitMaskHelper = tmp_ann_custom_bflag4;
                    }
                    MemberName name_bflag4 = "bflag4";
                    CompleteMemberDetail detail_bflag4 = TypeObjectUtils::build_complete_member_detail(name_bflag4, member_ann_builtin_bflag4, ann_custom_InnerBoundedBitMaskHelper);
                    CompleteBitflag bitflag_bflag4 = TypeObjectUtils::build_complete_bitflag(common_bflag4, detail_bflag4);
                    TypeObjectUtils::add_complete_bitflag(flag_seq_InnerBoundedBitMaskHelper, bitflag_bflag4);
                }
                {
                    uint16_t position_bflag6 = 6;
                    BitflagFlag flags_bflag6 = 0;
                    CommonBitflag common_bflag6 = TypeObjectUtils::build_common_bitflag(position_bflag6, flags_bflag6);
                    eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_bflag6;
                    ann_custom_InnerBoundedBitMaskHelper.reset();
                    AppliedAnnotationSeq tmp_ann_custom_bflag6;
                    if (!tmp_ann_custom_bflag6.empty())
                    {
                        ann_custom_InnerBoundedBitMaskHelper = tmp_ann_custom_bflag6;
                    }
                    MemberName name_bflag6 = "bflag6";
                    CompleteMemberDetail detail_bflag6 = TypeObjectUtils::build_complete_member_detail(name_bflag6, member_ann_builtin_bflag6, ann_custom_InnerBoundedBitMaskHelper);
                    CompleteBitflag bitflag_bflag6 = TypeObjectUtils::build_complete_bitflag(common_bflag6, detail_bflag6);
                    TypeObjectUtils::add_complete_bitflag(flag_seq_InnerBoundedBitMaskHelper, bitflag_bflag6);
                }
                CompleteBitmaskType bitmask_type_InnerBoundedBitMaskHelper = TypeObjectUtils::build_complete_bitmask_type(bitmask_flags_InnerBoundedBitMaskHelper, header_InnerBoundedBitMaskHelper, flag_seq_InnerBoundedBitMaskHelper);
                if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                        TypeObjectUtils::build_and_register_bitmask_type_object(bitmask_type_InnerBoundedBitMaskHelper, type_name_InnerBoundedBitMaskHelper.to_string()))
                {
                    EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "InnerBoundedBitMaskHelper already registered in TypeObjectRegistry for a different type.");
                }
                return_code_BoundedBitMaskStructure =
                    eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                    "InnerBoundedBitMaskHelper", type_ids_BoundedBitMaskStructure);
                if (return_code_BoundedBitMaskStructure != eprosima::fastdds::dds::RETCODE_OK)
                {
                    EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                                "InnerBoundedBitMaskHelper: Given Enum TypeIdentifier unknown to TypeObjectRegistry.");
                    type_id = TypeIdentifier();
                    return;
                }
            }
            StructMemberFlag member_flags_var_InnerBoundedBitMaskHelper = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructKind::NOT_APPLIED,
                    false, false, false, false);
            CommonStructMember common_var_InnerBoundedBitMaskHelper;
            MemberId member_id_var_InnerBoundedBitMaskHelper = 0x00000000;
            if (EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier1()._d() || TK_NONE == type_ids_BoundedBitMaskStructure.type_identifier2()._d() ||
                    (TI_PLAIN_SEQUENCE_SMALL == type_ids_BoundedBitMaskStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier1().seq_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_SEQUENCE_LARGE == type_ids_BoundedBitMaskStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier1().seq_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_SMALL == type_ids_BoundedBitMaskStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier1().array_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_LARGE == type_ids_BoundedBitMaskStructure.type_identifier1()._d() &&
                    EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier1().array_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_MAP_SMALL == type_ids_BoundedBitMaskStructure.type_identifier1()._d() &&
                    (EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier1().map_sdefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier1().map_sdefn().key_identifier()->_d())) ||
                    (TI_PLAIN_MAP_LARGE == type_ids_BoundedBitMaskStructure.type_identifier1()._d() &&
                    (EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier1().map_ldefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier1().map_ldefn().key_identifier()->_d())))
            {
                common_var_InnerBoundedBitMaskHelper = TypeObjectUtils::build_common_struct_member(member_id_var_InnerBoundedBitMaskHelper, member_flags_var_InnerBoundedBitMaskHelper, type_ids_BoundedBitMaskStructure.type_identifier1());
            }
            else if (EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier2()._d() ||
                    (TI_PLAIN_SEQUENCE_SMALL == type_ids_BoundedBitMaskStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier2().seq_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_SEQUENCE_LARGE == type_ids_BoundedBitMaskStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier2().seq_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_SMALL == type_ids_BoundedBitMaskStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier2().array_sdefn().header().equiv_kind()) ||
                    (TI_PLAIN_ARRAY_LARGE == type_ids_BoundedBitMaskStructure.type_identifier2()._d() &&
                    EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier2().array_ldefn().header().equiv_kind()) ||
                    (TI_PLAIN_MAP_SMALL == type_ids_BoundedBitMaskStructure.type_identifier2()._d() &&
                    (EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier2().map_sdefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier2().map_sdefn().key_identifier()->_d())) ||
                    (TI_PLAIN_MAP_LARGE == type_ids_BoundedBitMaskStructure.type_identifier2()._d() &&
                    (EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier2().map_ldefn().header().equiv_kind() ||
                    EK_COMPLETE == type_ids_BoundedBitMaskStructure.type_identifier2().map_ldefn().key_identifier()->_d())))
            {
                common_var_InnerBoundedBitMaskHelper = TypeObjectUtils::build_common_struct_member(member_id_var_InnerBoundedBitMaskHelper, member_flags_var_InnerBoundedBitMaskHelper, type_ids_BoundedBitMaskStructure.type_identifier2());
            }
            else
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "Structure var_InnerBoundedBitMaskHelper member TypeIdentifier inconsistent.");
                type_id = TypeIdentifier();
                return;
            }
            MemberName name_var_InnerBoundedBitMaskHelper = "var_InnerBoundedBitMaskHelper";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_var_InnerBoundedBitMaskHelper;
            ann_custom_BoundedBitMaskStructure.reset();
            CompleteMemberDetail detail_var_InnerBoundedBitMaskHelper = TypeObjectUtils::build_complete_member_detail(name_var_InnerBoundedBitMaskHelper, member_ann_builtin_var_InnerBoundedBitMaskHelper, ann_custom_BoundedBitMaskStructure);
            CompleteStructMember member_var_InnerBoundedBitMaskHelper = TypeObjectUtils::build_complete_struct_member(common_var_InnerBoundedBitMaskHelper, detail_var_InnerBoundedBitMaskHelper);
            TypeObjectUtils::add_complete_struct_member(member_seq_BoundedBitMaskStructure, member_var_InnerBoundedBitMaskHelper);
        }
        CompleteStructType struct_type_BoundedBitMaskStructure = TypeObjectUtils::build_complete_struct_type(struct_flags_BoundedBitMaskStructure, header_BoundedBitMaskStructure, member_seq_BoundedBitMaskStructure);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_BoundedBitMaskStructure, type_name_BoundedBitMaskStructure.to_string(), type_id))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "BoundedBitMaskStructure already registered in TypeObjectRegistry for a different type.");
        }
        return_code_BoundedBitMaskStructure =
            eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
            "BoundedBitMaskStructure", type_ids_BoundedBitMaskStructure);
        if (return_code_BoundedBitMaskStructure != eprosima::fastdds::dds::RETCODE_OK)
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "BoundedBitMaskStructure: Given Struct TypeIdentifier unknown to TypeObjectRegistry.");
            type_id = TypeIdentifier();
            return;
        }
    }
}

